#题目14： 创建一个函数，用于将一个整数列表中的偶数元素翻倍，并调用这个函数。

def  double_num(nums):
    for i in range(len(nums)):
        if nums[i]%2==0:
            nums[i]=nums[i]*2
    return nums

def double_evens(numbers):
    return [num * 2 if num%2==0 else num  for num in numbers]

if __name__ == '__main__':
    # nums=[1,2,3,4,5,6,7,8,9]
    # print(double_num(nums))
    nums=[int(input(f'请输入第{i}个数字:')) for i in range(1,6)]
    print(double_evens(nums))
